package com.jinzhi.jinzhidata.service.impl;

import com.jinzhi.jinzhidata.dataobject.Wallet;
import com.jinzhi.jinzhidata.repository.WalletRepository;
import com.jinzhi.jinzhidata.service.WalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author vansl
 * @description
 * @date 2020-01-04 17:26
 **/
@Service
public class WalletServiceImpl implements WalletService {

    @Autowired
    WalletRepository walletRepository;

    @Override
    public Wallet saveWallet(Wallet wallet) {
        return walletRepository.save(wallet);
    }

    @Override
    public Wallet selectByWalletId(String walletId) {
        return walletRepository.findById(walletId).orElse(null);
    }
}
